#include <iostream>
#include <cstdio>
using namespace std;
int high,a[11],ans;
int main()
{
    freopen("apple.in","r",stdin);
	freopen("apple.out","w",stdout);
	for(int i=1;i<=10;i++)
		cin>>a[i];
	cin>>high;
	for(int i=1;i<=10;i++)
		if(high+30>=a[i])
			ans++;
	cout<<ans;
	fclose(stdin);
	fclose(stdout);
	return 0;
}
